
package cn.zniot.so.apiprovide.business;

import cn.zniot.so.application.constant.Constants;
import cn.zniot.so.application.data.BcmStatus;

import net.sf.json.JSON;
import net.sf.json.JSONSerializer;

public class ErrorResponse extends Response {

    private Exception e = null;

    public ErrorResponse(Exception e) {
        this.e = e;
    }

    @Override
    public String toJsonPage() {

        BcmStatus bcmStatus = new BcmStatus();
        bcmStatus.setStatusCode(Constants.FAIL_CONNECT);
        JSON json = JSONSerializer.toJSON(bcmStatus);
        return json.toString();
    }

}
